import java.util.*;

public class Text {
    public static void main(String[] args) {
        HashMap<Integer,Integer> hashmap = new HashMap<>();

    }
    public int[] twoSum(int[] nums, int target) {
        Map<Integer,Integer> hashmap = new HashMap<>();
        for(int i = 0; i < nums.length; i++) {
            if(hashmap.containsKey(target - nums[i])) {
                return new int[]{hashmap.get(target-nums[i]),i};
            }
            hashmap.put(nums[i],i);
        }
        return new int[0];
    }
    public void merge(int[] nums1, int m, int[] nums2, int n) {
        int k = m +n - 1;
        int i = m - 1;
        int j = n - 1;
        while(i >= 0 && j >= 0) {
            if(nums1[i] > nums2[j]) {
                nums1[k] = nums1[i];
                i--;
                k--;
            }else {
                nums1[k] = nums2[j];
                j--;
                k--;
            }
        }
        while(j >= 0) {
            nums1[k] = nums2[j];
            k--;
            j--;
        }
    }
}
